--------------------------------------------------------------
-- Memoria de instruccion 64*12 (modelo ROM)
-- Autor: Omar Diaz
-- Fecha: 14/01/11
--------------------------------------------------------------

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;		 
use ieee.std_logic_unsigned.all;



entity instM is
	port(	
		Reset	: in std_logic;
		Address	: in std_logic_vector(5 downto 0);
		Data_out: out std_logic_vector(11 downto 0)
	);
end instM;

--------------------------------------------------------------

architecture behavioral of instM is
	signal rom_content : std_logic_vector(11 downto 0);

begin

    process(Reset, rom_content)
    begin
     if(Reset = '0') then
          data_out <= rom_content;
	else
          data_out <= "ZZZZZZZZZZZZ";
	end if;
    end process;
    
        with address(5 downto 0) select
            rom_content <= 
                B"000000000000" when B"000000",
                B"000000000001" when B"000001",		-- Aqui va el programa 
   	        	B"000000000010" when B"000010",		-- que se va a ejecutar
                B"000000000011" when B"000011",
                B"000000000100" when B"000100",
                B"000000000101" when B"000101", 
                B"000000000110" when B"000110",
                B"000000000111" when B"000111",
                B"000000001000" when B"001000",
                B"000000001001" when B"001001",
                B"000000001010" when B"001010",
                B"000000001011" when B"001011",
                B"000000001100" when B"001100",
                B"000000001101" when B"001101",
                B"000000001110" when B"001110",
                B"000000001111" when others;
end behavioral;

--------------------------------------------------------------

